home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Minami 85
/
MINAMI85.iso
/
Extra
/
winamp535.exe
/
$R0
/
Winamp Modern
/
scripts
/
titlebar.maki
(
.txt
)
< prev
next >
Wrap
Winamp Compiled Maki Script
|
2005-09-15
|
4KB
|
117 lines
/* Note: a decompiler is no invitation to steal code.
Please respect the the copyright */
#include "std.mi"
Global GuiObject GuiObject16;
Global GuiObject GuiObject17;
Global GuiObject GuiObject18;
Global Text Text19;
Global Layer Layer20;
Global Group Group21;
Global Int Int22;
Global Int Int23;
Function func864();
System.onScriptLoaded()
{
Int22 = 0;
Int23 = 0;
Group21 = System.getScriptGroup();
if(( Group21 == Null)) {
System.messageBox(( "titlebar\.maki\ can\ only\ run\ within\ a\ group"), ( "Error"), 0, ( ""));
return Null;
}
GuiObject16 = Group21.findObject(System.getToken(System.getParam(), ( "\;"), 0));
GuiObject18 = Group21.findObject(System.getToken(System.getParam(), ( "\;"), 1));
if(( GuiObject18 != Null)) {
Text19 = GuiObject18.findObject(( "window\.titlebar\.title"));
Layer20 = GuiObject18.findObject(( "window\.titlebar\.title\.overlay"));
}
GuiObject17 = Group21.findObject(System.getToken(System.getParam(), ( "\;"), 2));
return Null;
}
Int Group21.onNotify(String command, String param, int a, int b)
{
String String34;
String String33;
String33 = System.getToken(command, ( "\,"), 0);
String34 = System.getToken(command, ( "\,"), 1);
if(( ( String33 == ( "padtitleright")) || ( String33 == ( "padtitleright")))) {
System.onSetXuiParam(String33, String34);
}
return Null;
}
System.onSetXuiParam(String param, String value)
{
if(( param == ( "padtitleright"))) {
Int23 = ( Int23 + System.StringToInteger(value));
func864();
}
if(( param == ( "padtitleleft"))) {
Int22 = ( Int22 + System.StringToInteger(value));
func864();
}
return Null;
}
func864()
{
Layout Layout42;
Int Int41;
Int Int43;
Int Int39;
Int Int40;
Int39 = 0;
Int40 = 0;
Int41 = Group21.getWidth();
Layout42 = Group21.getParentLayout();
Int40 = Layout42.getWidth();
if(( GuiObject18 != Null)) {
Int39 = GuiObject18.getAutoWidth();
}
Int43 = ( ( Int40 - Int39) / 2);
Int43 = Layout42.clientToScreenX(Int43);
Int43 = Group21.screenToClientX(Int43);
Int43 = ( Int43 - Group21.getLeft());
if(( GuiObject18 != Null)) {
GuiObject18.setXmlParam(( "x"), System.integerToString(Int43));
GuiObject18.setXmlParam(( "relatx"), ( "0"));
GuiObject18.setXmlParam(( "w"), System.integerToString(Int39));
GuiObject18.setXmlParam(( "relatw"), ( "0"));
Layer20.setXmlParam(( "x"), System.integerToString(Int43));
Layer20.setXmlParam(( "relatx"), ( "0"));
Layer20.setXmlParam(( "w"), System.integerToString(Int39));
Layer20.setXmlParam(( "relatw"), ( "0"));
}
if(( GuiObject16 != Null)) {
GuiObject16.setXmlParam(( "x"), System.integerToString(Int22));
GuiObject16.setXmlParam(( "relatx"), ( "0"));
GuiObject16.setXmlParam(( "w"), System.integerToString(( ( Int43 - Int22) - 0)));
GuiObject16.setXmlParam(( "relatw"), ( "0"));
}
if(( GuiObject17 != Null)) {
GuiObject17.setXmlParam(( "x"), System.integerToString(( ( ( Int43 + Int39) + 0) + 1)));
GuiObject17.setXmlParam(( "relatx"), ( "0"));
GuiObject17.setXmlParam(( "w"), ( ( "\-") + System.integerToString(( ( ( ( ( Int43 + Int39) + 1) + Int23) + 0) + 1))));
GuiObject17.setXmlParam(( "relatw"), ( "1"));
}
return Null;
}
Text19.onTextChanged(String newtxt)
{
func864();
return Null;
}
Group21.onResize(int x, int y, int w, int h)
{
func864();
return Null;
}